﻿@{
    ViewBag.Title = "show";
}
<!--
<div id="cphMain_ctl00_ContentPane" class="center">
    <div id="Breadcrumb" class="Breadcrumb">
    <ul>
        <li class="first">
            <a href="/Main/index2">
                Trang chủ
            </a>
        </li>
        
                
            @if (Request.QueryString["id"]==null)
            {
                <li>
                    <span>Sản phẩm</span>
                </li>                
            }else if (Request.QueryString["group"]==null)
            {
                <li>
                    <a href="/Main/show">Sản phẩm</a>
                </li>
                <li>
                    <span>@ViewBag.cateName</span>
                </li>                   
            }else
            {
                <li>
                    <a href="/Main/show">Sản phẩm</a>
                </li>
                <li>
                    <a href='/Main/show?id=@Request.QueryString["id"]'>@ViewBag.cateName</a>
                </li> 
                  <li>
                    <span>@Request.QueryString["group"]</span>
                </li>
            }
             
            
    </ul>
</div>
    <div class="Clear"></div>
    <style type="text/css">
.InfoMessage{ background: #EFF8FA; color: #555555; margin-bottom: 10px; padding: 6px; padding-bottom: 1px; }
.InfoMessage p{ line-height: 1.3; margin-bottom: 15px; }
.listing-type-list .disable{ display: none; }
</style>
    <script type="text/javascript">
        $j(document).ready(function () {
            var orderby = document.getElementById("orderby");
            for (var i = 0; i < orderby.length; i++) {
                if (orderby[i].value.toLowerCase() == '') { orderby[i].selected = true; }
            }
        });
</script>
    

    <div class="ProductListContainer ListItems DefaultModule">
    <div class="FloatRight SortBox">
        Sắp xếp theo:
        <select id="orderby" onchange="window.location.href = '162361456d.html?sort='+ this.options[ this.selectedIndex ].value">
            <option value="newest">Mới nhất</option>
            <option value="featured">Nổi bật</option>
            <option value="alphaasc">Sắp xếp: A - Z</option>
            <option value="alphadesc">Sắp xếp: Z - A</option>
            <option value="priceasc">Giá: Thấp - Cao</option>
            <option value="pricedesc">Giá: Cao - Thấp</option>
        </select>
    </div>
    <div class="FloatRight views">
        <a href="162361f732.html?view=table" title="Hiển thị dạng bảng">
            <img src="/Content/static.bizwebmedia.net/Images/table-view.jpg" alt="">
        </a>
        <a href="162361d1fd.html?view=list" title="Hiển thị dạng danh sách">
            <img src="/Content/static.bizwebmedia.net/Images/list-view.jpg" alt="">
        </a>
    </div>
    <div class="category-title defaultTitle productlist-title">
        @if (Request.QueryString["id"]==null)
        {
            <h1>Sản Phẩm</h1>
        }else if(Request.QueryString["group"]==null)
        {
            <h1>@ViewBag.cateName</h1>
        }else
        {
            <h1>@Request.QueryString["group"]</h1>
        }
        
    </div>
    <div class="TopContent">
        
    </div>
    <div id="ProductList" class="defaultContent listing-type-list productlist-content catalog-listing">
        
     @{int count = Enumerable.Count(ViewBag.list);
       string first = "First";
       for (int i = 0; i < ((count - 1) / 4 + 1); i++)
       {
           if (i > 0)
           {
               first = "";
           }
                    <ul class="ProductList @first">                    
                        @{ string old_even;
                           for (int j = i * 4; j < (i + 1) * 4 && j < count; j++)
                           {
                               var pro = Enumerable.ElementAt(ViewBag.list, j);
                               if (j % 2 == 0)
                               {
                                   old_even = "Odd";
                               }
                               else
                               {
                                   old_even = "Even";
                               }
                        <li class="@old_even">
                                <div id="ProductImage" class="ProductImage ProductImageTooltip po_190309">
                                    <a href="/Main/viewProduct?proID=@pro.ID" rel="2172035" class="#tooltip2172035"
                                        productname='@pro.name' description='' 
                                        thumbnail='/Content/data/images/350.300/@pro.image_link' 
                                        thumbnailerror='/Content/data/images/not_available.jpg' promotion='' >
                                        <img alt="@pro.name" title="@pro.name" 
                                                src="/Content/data/images/@pro.image_link" onerror="this.src='http://media.bizwebmedia.net/Thumbnail.ashx?img=sites/9808/data/images/2013/8/344183811.JPG&amp;width=120&amp;height=120';" />
                                    </a>
                                </div>
                            @if (pro.promotion_ID > 0)
                            {
                                <div class="saleFlag iconSprite ">
                                    @pro.Promotion.rate<span>%</span></div>
                            }                                
                                <div class="ProductDetails">
                                    <strong><a href='/Main/viewProduct?proID=@pro.ID'>
                                        @pro.name<span class='Flag-Promotion'>&nbsp;</span></a></strong>
                                </div>
                                <div class="ProductPrice">
                                    @{ string retail_price = Convert.ToInt32(pro.price) + "VND / thùng";
                                       int sale_price = sale_price = Convert.ToInt32(pro.price);
                                       if (pro.promotion_ID > 0)
                                       {
                                           sale_price = Convert.ToInt32(pro.price / 100 * (100 - pro.Promotion.rate));
                                       }
                                       else
                                       {
                                           retail_price = "";
                                       }
                                       
                                        <div class="retail-price ">                                        
                                        <span class="price-label"></span><span class="price">
                                            &nbsp;<strike class="RetailPriceValue">                                            
                                            @retail_price
                                            </strike>
                                        </span>                                        
                                    </div>
                                    <div class="special-price">
                                        <span class="price-label"></span><span class="price"><em>
                                            @sale_price VND / thùng</em>
                                        </span>
                                    </div>
                                    }
                                </div>

                                <div class="ProductActionAdd"><a href="/Main/viewProduct?proID=@pro.ID"><span>Mua hàng</span></a></div>
                            </li>                                               
                           }
                    <br class="Clear" />
                        }
                </ul>         
                
     }  
     }    
            
        
        <div class="clear">
        </div>                
        
<link rel="Stylesheet" href="/Content/static.bizwebmedia.net/Css/pagenavigation.css" type="text/css">
<div class="PageNavigation" style="padding-bottom: 10px; padding-top: 10px;" align="center">
    
    
    
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_0" class="active" href="162361c749.html?pn=1" style="background-color:gray;color:white;"><strong>1</strong></a>
            
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_1" href="1623618cfa.html?pn=2">2</a>
            
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_2" href="16236186ae.html?pn=3">3</a>
            
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_3" href="1623615075.html?pn=4">4</a>
            
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_4" href="162361ece3.html?pn=5">5</a>
            
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_5" href="1623616452.html?pn=6">6</a>
            
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_6" href="1623612515.html?pn=7">7</a>
            
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_7" href="162361f511.html?pn=8">8</a>
            ...
        
            <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_rptPaging_hplPaging_8" href="162361b955.html?pn=14">14</a>
            
        
    <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_hplNextPage" href="1623618cfa.html?pn=2">&gt;&gt;</a>
    <a id="cphMain_ctl00_ctl01_ctl00_PageBottom_hplLast" href="162361b955.html?pn=14">Trang cuối</a>
</div>

    </div>
    <div class="clear defaultFooter productlist-footer">
        <div>
        </div>
    </div>
</div>




<div id="productReviewPopup190309" class="hidden"></div>
<script type="text/javascript">
    $j(function () {
        $j(".ProductList .po_190309 a").each(function () {
            var productname = $j(this).attr("productname");
            var thumbnail = $j(this).attr("thumbnail");
            var thumbnailerror = $j(this).attr("thumbnailerror");
            var description = $j(this).attr("description");
            var promotion = $j(this).attr("promotion");
            $j(this).bind("mouseover", function () {
                var promotionHtml = "";
                if (promotion != "") promotionHtml = "<div class=\"promotion-description\">" + promotion + "</div>";
                var returnHtml =
                    "<div class=\"tooltip_name\">" + productname + '</div>' +
                    "<div class=\"tooltip_picture\">" +
                        "<img src=\"" + thumbnail + "\" onerror=\"this.src='" + thumbnailerror + "'\" title=\"" + productname + "\" alt=\"" + productname + "\" />" +
                    "</div>" +
                    "<div class=\"tooltip_description\">" + description + "</div>" +
                    promotionHtml +
                    "<div class=\"teaser\"></div>";
                $j("#productReviewPopup190309").html(returnHtml);
            });
            $j(this).tooltip({
                track: true, delay: 50, showURL: false,
                bodyHandler: function () {
                    return $j("#productReviewPopup190309").html();
                }
            });
        });
    });
</script>

<div id="productReviewPopup190310" class="hidden"></div>
<script type="text/javascript">
    $j(function () {
        $j(".ProductList .po_190310 a").each(function () {
            var productname = $j(this).attr("productname");
            var thumbnail = $j(this).attr("thumbnail");
            var thumbnailerror = $j(this).attr("thumbnailerror");
            var description = $j(this).attr("description");
            var promotion = $j(this).attr("promotion");
            $j(this).bind("mouseover", function () {
                var promotionHtml = "";
                if (promotion != "") promotionHtml = "<div class=\"promotion-description\">" + promotion + "</div>";
                var returnHtml =
                    "<div class=\"tooltip_name\">" + productname + '</div>' +
                    "<div class=\"tooltip_picture\">" +
                        "<img src=\"" + thumbnail + "\" onerror=\"this.src='" + thumbnailerror + "'\" title=\"" + productname + "\" alt=\"" + productname + "\" />" +
                    "</div>" +
                    "<div class=\"tooltip_description\">" + description + "</div>" +
                    promotionHtml +
                    "<div class=\"teaser\"></div>";
                $j("#productReviewPopup190310").html(returnHtml);
            });
            $j(this).tooltip({
                track: true, delay: 50, showURL: false,
                bodyHandler: function () {
                    return $j("#productReviewPopup190310").html();
                }
            });
        });
    });
</script>
</div>

-->